

<div>
  <a ng-click="openPlunkr('examples/example-example107')" class="btn pull-right">
    <i class="glyphicon glyphicon-edit">&nbsp;</i>
    Edit in Plunker</a>
  <div class="runnable-example"
      path="examples/example-example107"
      module="myServiceModuleDI">

   
    <div class="runnable-example-file" 
      name="index.html"
      language="html"
      type="html">
      <pre><code>&lt;div id=&quot;implicit&quot; ng-controller=&quot;MyController&quot;&gt;&#10;  &lt;p&gt;Let&#39;s try the notify service, that is implicitly injected into the controller...&lt;/p&gt;&#10;  &lt;input ng-init=&quot;message=&#39;test&#39;&quot; ng-model=&quot;message&quot;&gt;&#10;  &lt;button ng-click=&quot;callNotify(message);&quot;&gt;NOTIFY&lt;/button&gt;&#10;  &lt;p&gt;(you have to click 3 times to see an alert)&lt;/p&gt;&#10;&lt;/div&gt;</code></pre>
    </div>
  
    <div class="runnable-example-file" 
      name="script.js"
      language="js"
      type="js">
      <pre><code>angular.module(&#39;myServiceModuleDI&#39;, []).&#10;  factory(&#39;notify&#39;, function($window) {&#10;    var msgs = [];&#10;    return function(msg) {&#10;      msgs.push(msg);&#10;      if (msgs.length == 3) {&#10;        $window.alert(msgs.join(&quot;\n&quot;));&#10;        msgs = [];&#10;      }&#10;    };&#10;  }).&#10;  controller(&#39;MyController&#39;, function($scope, notify) {&#10;    $scope.callNotify = function(msg) {&#10;      notify(msg);&#10;    };&#10;  });</code></pre>
    </div>
  

    <iframe class="runnable-example-frame" src="examples/example-example107/index.html" name="example-example107"></iframe>
  </div>
</div>

age="js">
      <pre><code>it(&#39;should test service&#39;, function() {&#10;  expect(element(by.id(&#39;simple&#39;)).element(by.model(&#39;message&#39;)).getAttribute(&#39;value&#39;))&#10;      .toEqual(&#39;test&#39;);&#10;});</code></pre>
    </div>
  

    <iframe class="runnable-example-frame" src="examples/example-example106/index.html" name="example-example106"></iframe>
  </div>
</div>

y(&#39;integer&#39;, false);&#10;          return undefined;&#10;        }&#10;      });&#10;    }&#10;  };&#10;});&#10;&#10;var FLOAT_REGEXP = /^\-?\d+((\.|\,)\d+)?$/;&#10;app.directive(&#39;smartFloat&#39;, function() {&#10;  return {&#10;    require: &#39;ngModel&#39;,&#10;    link: function(scope, elm, attrs, ctrl) {&#10;      ctrl.$parsers.unshift(function(viewValue) {&#10;        if (FLOAT_REGEXP.test(viewValue)) {&#10;          ctrl.$setValidity(&#39;float&#39;, true);&#10;          return parseFloat(viewValue.replace(&#39;,&#39;, &#39;.&#39;));&#10;        } else {&#10;          ctrl.$setValidity(&#39;float&#39;, false);&#10;          return undefined;&#10;        }&#10;      });&#10;    }&#10;  };&#10;});</code></pre>
    </div>
  

    <iframe class="runnable-example-frame" src="examples/example-example99/index.html" name="example-example99"></iframe>
  </div>
</div>

quot;selected&quot; ng-transclude&gt;&#10;&lt;/div&gt;</code></pre>
    </div>
  

    <iframe class="runnable-example-frame" src="examples/example-example89/index.html" name="example-example89"></iframe>
  </div>
</div>

invoice.inCurr&quot;&gt;&#10;      &lt;option ng-repeat=&quot;c in invoice.currencies&quot;&gt;{{c}}&lt;/option&gt;&#10;    &lt;/select&gt;&#10;  &lt;/div&gt;&#10;  &lt;div&gt;&#10;    &lt;b&gt;Total:&lt;/b&gt;&#10;    &lt;span ng-repeat=&quot;c in invoice.currencies&quot;&gt;&#10;      {{invoice.total(c) | currency:c}}&#10;    &lt;/span&gt;&#10;    &lt;button class=&quot;btn&quot; ng-click=&quot;invoice.pay()&quot;&gt;Pay&lt;/button&gt;&#10;  &lt;/div&gt;&#10;&lt;/div&gt;</code></pre>
    </div>
  

    <iframe class="runnable-example-frame" src="examples/example-guide-concepts-3/index.html" name="example-guide-concepts-3"></iframe>
  </div>
</div>

;, function() {&#10;      return function(scope, elm, attrs) {&#10;        var browser = browsers[attrs.browser],&#10;            input = angular.element(&#39;&lt;input type=&quot;text&quot; style=&quot;width: 400px&quot;&gt;&#39;).val(browser.url()),&#10;            delay;&#10;&#10;        input.on(&#39;keypress keyup keydown&#39;, function() {&#10;          if (!delay) {&#10;            delay = setTimeout(fireUrlChange, 250);&#10;          }&#10;        });&#10;&#10;        browser.url = function(url) {&#10;          return input.val(url);&#10;        };&#10;&#10;        elm.append(&#39;Address: &#39;).append(input);&#10;&#10;        function fireUrlChange() {&#10;          delay = null;&#10;          browser.urlChange(input.val());&#10;        }&#10;      };&#10;    });&#10;  }]);&#10;  root.on(&#39;click&#39;, function(e) {&#10;    e.stopPropagation();&#10;  });&#10;}&#10;&#10;initEnv(&#39;html5&#39;);&#10;initEnv(&#39;hashbang&#39;);</code></pre>
    </div>
  

    <iframe class="runnable-example-frame" src="examples/example-example69/index.html" name="example-example69"></iframe>
  </div>
</div>

